package com.zj.osm.view.home.home;


import com.zj.osm.entity.greendao.Project;
import com.zj.osm.mvp.BasePresenter;

import java.util.List;

/**
 * 主页P层 持有M层和V层的引用
 *
 * @author jiang zhu on 2019/10/26
 */
class HomeActivityPresenter extends BasePresenter<HomeActivityView> {

    private HomeActivityModel mapModel;

    HomeActivityPresenter(){
        this.mapModel = new HomeActivityModel();
    }


    void getProjectList(int page) {
        List<Project> projectList = mapModel.getProjectList(page);
        if (getView()!=null){
            getView().getProjectList(projectList,page);
        }
    }

    void deleteProject(Project project) {
        mapModel.deleteProject(project);
    }
}
